/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.ekuma.epos.inventory;

import java.awt.Component;

import cn.ekuma.data.dao.I_DataLogic;
import cn.ekuma.data.ui.swing.SwingEditorRecord;
import cn.ekuma.epos.datalogic.I_DataLogicERP;
import cn.ekuma.epos.module.ERP_UI_Swing_Model;
import cn.ekuma.epos.panel.JPanelTableDAO;
import com.openbravo.data.basic.BasicException;
import com.openbravo.pos.model.AbstractPosSwingModel;
import com.openbravo.bean.erp.TimeStore;


/**
 *
 * @author Administrator
 */
public class JTimeStorePanel extends JPanelTableDAO<TimeStore>{
    private I_DataLogicERP m_dlSales;
    private JTimeStoreEditor jeditor;
    @Override
    protected void init() {
       
        jeditor=new JTimeStoreEditor(m_dlSales,this.dirty);
    }

    @Override
    public void activate() throws BasicException {
        jeditor.activate();
        super.activate();
    }

    @Override
    public SwingEditorRecord getEditor() {
        return jeditor;
    }


    @Override
    public String getTitle() {
        return "";
    }

	@Override
	public Component getFilter() {
		return null;
	}

	@Override
	public I_DataLogic getDataLogic() {
		return m_dlSales;
	}

	@Override
	public Class getSuportClass() {
		return TimeStore.class;
	}

	@Override
	public String getObjectRenderString(TimeStore obj) {
		return obj.getName();
	}

	@Override
	public String getModelName() {
		return ERP_UI_Swing_Model.MODEL_NAME;
	}

	@Override
	public void setModel(AbstractPosSwingModel mode) {
		 m_dlSales =mode.getDLERP();
	}
}
